const $axios = require("w-vue-middle/api/axios").default

/**
 * @Author: \y_zp
 * @description: 是否显示验证码
 */
export function sysConfigByKey(configKey) {
  return $axios({
    url: `${$service.portalService}/sysConfig/getByKey/${configKey}`,
    method: 'get'
  })
}

/**
 * @Author: y_zp
 * @description: 字典列表
 */
export function getSysDictData(params = {
  pageNum: 1,
  pageSize: 15,
  queryParams: {
    F_dictType_eq: undefined,
  },
}) {
  return $axios({
    url: `${$service.portalService}/sysDictData/list`,
    method: 'post',
    data: params
  })
}

/**
 * @Author: \y_zp
 * @description: 实时元数据采集作业
 */
export function collectionDataInfo(params = {
  clusterId: undefined, //集群ID
  collectType: 'schema', // 采集类型：schema、table、column
  dsId: undefined,
  schema: undefined,
  tableName: undefined
}) {

  return $axios({
    url: `${$service.portalService}/MetaData/realtime/job`,
    method: 'post',
    data: params,
    allError: true,
  })
}